package exception;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入用户名:");
        String username = scanner.nextLine();
        System.out.println("请输入密码:");
        String password = scanner.nextLine();

        if(!"admin".equals(username) || !"admin".equals(password)) {
            throw new PasswordErrorRuntimeException("密码不正确");
        }

        System.out.println("登录成功");
    }
}
